<template>
    <div class="header">
        <div class="header-left">
            <div class="iconfont back-icon">&#xeb99;</div>
        </div>
        <div class="header-input"><span class="iconfont">&#xeb9c;</span>输入城市/景点/酒店等</div>
        <router-link to="/city"
            ><!-- 点击这里，他就会跳转到city页面 -->
            <div class="header-right">
                {{ this.city }}
                <span class="iconfont">&#xe615;</span>
            </div>
        </router-link>
    </div>
</template>
<script>
export default {
    name: 'HomeHeader',
    props: {
        city: String,
    },
};
/* 1rem == html中的font-size：50px
 */
</script>
<style lang="stylus" scoped>
/*
  引入外部的文件，记得这里要加波浪线
*/
@import '~@/assets/styles/varibles.styl'
.header
  display flex;
  height .86rem;
  line-height .86rem;
  background : $bgColor;
  color #fff;
  .header-left
    width .64rem;
    float left;
    .back-icon
      text-align center;
      font-size .5rem;
  .header-input
    flex 1;
    background #fff;
    color #95a5a6;
    margin-top .12rem;
    margin-left .2rem;
    padding-left .2rem;
    border-radius .1rem;
    height .64rem;
    line-height .64rem;
  .header-right
    float right;
    width 1.24rem;
    text-align center;
    color #fff;
</style>
